/*
 * @description: Router
 * @Author: wxy
 * @Date: 2020-12-30 13:38:17
 */
import Vue from 'vue';
import VueRouter from 'vue-router';
import mLayoutWithNavBar from '@/views/layout/layoutWithNavbar';

Vue.use(VueRouter);

const routes = [
  // 目录（供本地调试使用）
  {
    path: '/',
    component: () => import('@/views/menu'),
    name: 'menu',
  },
  // 首页  不需要navbar的页面不需要继承mLayoutWithNavBar
  {
    path: '/ccchat',
    component: mLayoutWithNavBar,
    children: [
      {
        path: '/home',
        component: () => import('@/views/home'),
        name: 'home',
        meta: {
          title: '首页',
        },
      },
    ],
  },
];

const router = new VueRouter({
  routes,
});

export default router;
